export interface PositionDetails {
  companyVO: CompanyVO
  createTime: string
  id: string
  studyingExperience: number
  updateTime: string
  workAddress: [number?, number?, number?]
  workDescription: string
  workPrice: number
  workTime: number
  workName: string
  workStatus: number
}

// 服务端响应职位数据
export type PositionDataResponse = ApiResponseData<{
  records: PositionDetails[]
  total: number
  size: number
  current: number
  pages: number
  orders: string[]
  searchCount: boolean
}>

// 查询职位表单参数
export interface QueryPositionFormParams {
  id?: number
  studyingExperience?: number // 学历要求 0/1/2/3/4/5/6 无要求/初中以下/高中/大专/本科/硕士/博士
  workAddress?: [string?, string?, string?] // [string?, string?, string?]
  workPrice?: number // 3k以下/3-5k/5-10k/10-20k/20k-50k/50k以上 1/2/3/4/5/6
  workName?: string
  workTime?: number // 工作经验 0/1/2/3/4/5 应届生（无经验）/1年以内/1-3年/3-5年/5-10年/10年以上
  workStatus?: 0 | 1 | 2 // 职位状态 0/1/2 待审核/审核失败/已审核
  isCompany?: boolean // 是否以公司身份获取发布的岗位
}

// 查询地址参数
export interface QueryAddressParam {
  workAddress?: string
}

// 查询职位参数
export type QueryPositionParams = Omit<QueryPositionFormParams, "workAddress"> &
  QueryAddressParam &
  QueryPaginationParams

// 添加职位信息表单参数
export type AppendPositionParams = Omit<
  PositionDetails,
  "companyVO" | "createTime" | "updateTime" | "workStatus" | "workAddress" | "id"
> &
  QueryAddressParam

// 修改职位信息表单参数
export type UpdatePositionFormParams = AppendPositionParams & Pick<PositionDetails, "id">

// 审核职位参数
export interface AduitPositionParams {
  id: number
  workStatus: 1 | 2 // 1拒绝 2通过
}
